LView.vue<template>
  <h1>El-开关组件</h1>
  <el-switch v-model="value1" />
  <el-switch
      v-model="value2"
      class="ml-2"
      style="--el-switch-on-color: skyblue; --el-switch-off-color: red"
  />
  <hr>
  是否为管理员<el-switch v-model="idAdmin" />
  是否显示图片<el-switch v-model="isShow" />
  <hr>
  <img src="fcq.jpg" width="200" v-if="isShow">
  <el-switch v-model="num" :active-value="1" :inactive-value="0"/>
  <el-switch v-model="numStr" :active-value="'1'" :inactive-value="'0'"/>
</template>

<script setup>
import { ref } from 'vue'

const value1 = ref(true)
const value2 = ref(false)

const idAdmin = ref(false);
const isShow = ref(false);

const num = ref(0);
const numStr = ref('1');
</script>


<style scoped>

</style>